<script>
import httpApi from '@/http/index.js';
export default {
	onLaunch: function () {
		console.log('App Launch');
		wx.login({
			success(res_login) {
				console.log(res_login);
				httpApi.UserApi.login({ code: res_login.code }).then((res) => {
					uni.setStorageSync('token', res.data.token);
				});
			}
		});
		console.log('App Launch');
	},
	onShow: function () {
		console.log('App Show');
	},
	onHide: function () {
		// console.log('App Hide');
	}
};
</script>

<style lang="scss">
@import '@/static/iconfont/iconfont.css';
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import '@/uni_modules/uview-ui/index.scss';
.page {
	width: 750rpx;
	min-height: 100vh;
	background-color: #222;
	padding-bottom: 200rpx;
	box-sizing: border-box;
	&-main {
		width: 690rpx;
		margin: 0 auto;
		&-title {
			margin-top: 20rpx;
			padding-left: 30rpx;
			margin-bottom: 20rpx;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: space-between;
			&-text {
				font-size: 32rpx;
				color: #999;
			}
			&-right {
				display: flex;
				align-items: center;
				gap: 10rpx;
				&-text {
					font-size: 32rpx;
					color: #fff;
				}
			}
		}
	}
}
</style>
